home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
mail
/
netmail_13.lha
/
NetMail
/
Drivers
/
Dme.editor
< prev
next >
Wrap
Text File
|
1995-10-14
|
2KB
|
66 lines
/*
** $VER: Ed.editor 1.1 (11.8.95)
** Copyright (c) 1995 Roger Cassatella
**
*/
OPTIONS RESULTS
OPTIONS FAILAT 21
cmd = 'sys:utilities/dme'
IF ~EXISTS(cmd) THEN DO
cmd = GetVar('NetMail/DmeCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN DO
ADDRESS COMMAND 'SetEnv NetMail/DmeCmd `Which "Dme"`'
cmd = GetVar('NetMail/DmeCmd')
IF cmd = 0 THEN DO
ADDRESS COMMAND 'SetEnv NetMail/DmeCmd `RequestFile Title "Select Dme command" Noicons`'
cmd = GetVar('NetMail/DmeCmd')
IF cmd = 0 | ~EXISTS(cmd) THEN RETURN 2
ADDRESS COMMAND 'Copy QUIET ENV:NetMail/DmeCmd ENVARC:NetMail/DmeCmd'
END
END
END
SELECT
WHEN UPPER(ARG(1)) = 'EDIT' THEN DO
PARSE ARG , file, port
winpar = ''
wininfo = GetVar('NetMail/EditorWin')
IF wininfo ~= 0 THEN DO
PARSE VAR wininfo pL pT pW pH .
winpar = 'WINDOW="CON:'pL'/'pT'/'pW'/'pH'/Ed editor"'
END
port = 'DME'
IF ~SHOW('P', port) THEN DO
ADDRESS COMMAND
'Run >NIL:' cmd ' 'file' ' winpar
'WaitForPort' port
IF RC ~= 0 THEN RETURN 5
END
ELSE DO
ADDRESS VALUE port
'NEWFILE 'file
END
END
WHEN UPPER(ARG(1)) = 'SAVE' THEN DO
PARSE ARG , port
IF SHOW('P', port) & ABBREV(port, 'DME') THEN DO
ADDRESS VALUE port
'SAVEOLD'
END
END
WHEN UPPER(ARG(1)) = 'CLOSE' THEN DO
PARSE ARG , port
IF SHOW('P', port) & ABBREV(port, 'DME') THEN DO
ADDRESS VALUE port
'QUIT'
END
END
END
RETURN port